﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CloudTree.Domain;

namespace CloudTree.Controllers
{
    public class DepartmentController : Controller
    {
         private readonly IDepartmentDataSource _db;

         public DepartmentController(IDepartmentDataSource db)
         {
             _db = db;
         }

        public ActionResult Detail(int id)
        {
            var model = _db.Departments.Single(d => d.ID == id);

            return View(model);
        }

    }
}
